<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Demo02</title>
</head>
<body>
  <!-- 原型模式 -->
  <script>
    Object.create = Object.create || function(obj) {
      var F = function() {};
      F.prototype = obj;
      
      return new F();
    }

    var Plane = function () {
      this.blood = 100;
      this.attackLevel = 1;
      this.defenseLevel = 1;
    }

    var plane = new Plane();
    plane.blood = 100;
    plane.attackLevel = 10;
    plane.defenseLevel = 7;

    var clonePlane = Object.create(plane)

    console.log(clonePlane)

  </script>
</body>
</html>